package be.fomp.jeve.application;

import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;

import be.fomp.jeve.application.api.StandardFactory;
import be.fomp.jeve.application.data.standard.AllianceList;

public class StandardFactoryTestWithoutCaching extends TestCase {

	StandardFactory factory;
	
	@Before
	public void setUp() throws Exception{
		factory = new JeveObjectFactory(null).standard;

	}
	
	@Test
	public void testAllianceList(){
		try {
		AllianceList allianceList = factory.loadAllianceList();
		
		if(allianceList==null) fail("Should not be null!");
		
		factory.storeAllianceList(allianceList);
		
		//Loading from cache if it is enabled
		AllianceList allianceList2 = factory.loadAllianceList();
		} catch (Exception e) {
			fail("Should not get here!" +  e);
		}
	}
}
